﻿using System;

namespace Identity.Dto
{
    public class UserDto
    {
        public UserDto()
        {
        }

        public UserDto(User user)
        {
            Id = user.Id;
            Name = user.Name;
        }

        public string Name { get; set; }
        public string Id { get; set; }
    }

    public class RoleDto
    {
        public RoleDto(Role role)
        {
            if (role == null) throw new ArgumentNullException(nameof(role));
            Id = role.Id;
            Name = role.Name;
        }

        /// <summary>
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// </summary>
        public string Name { get; set; }
    }
}